Skip to content

IGNITE-29145 Label and comment on PRs with wire format changes - #13876

Merged
chesnokoff merged 20 commits into
apache:masterfrom
chesnokoff:ignite-29145
Nov 25, 2026
Merged

chesnokoff merged 20 commits into
apache:masterfrom
chesnokoff:ignite-29145

Conversation

@chesnokoff

Copy link
Copy Markdown
Contributor

Thank you for submitting the pull request to the Apache Ignite.

In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see tab PR Check at TC.Bot - Instance 1 or TC.Bot - Instance 2)

Notes

If you need any help, please email dev@ignite.apache.org or ask any advice on https://the-asf.slack.com #ignite channel.

@chesnokoff

chesnokoff commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

The wire format check runs with the other PR checks. It runs when you open or reopen a PR and when you push new commits to its branch.

That's why I removed the separate @Order check.

  • If the wire format changed, the bot adds the compatibility label, deletes its old wire warning and posts a new one with a link to the diff in Job Summary.
  • If the wire format stayed the same, the bot removes the label, even if a reviewer added it. It also deletes its wire warning. It keeps reviewer comments and other bot comments.
  • If CI cannot confirm the result, the bot leaves the labels and comments as they are.

I tested both cases in my fork. In PR #22, a rerun replaced the old warning with one new comment. In PR #23, I removed the wire change. The bot removed its warning and the label. The reviewer comment stayed.

const comments = await list(issues.listComments, issue);
const {data: pr} = await pulls.get({...repo, pull_number: target.number});
if (pr.state !== 'open' || pr.head.repo?.id !== run.head_repository.id || pr.head.ref !== run.head_branch
|| pr.head.sha !== run.head_sha || pr.base.ref !== target.base.ref)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An older run can overwrite a newer result even when this check passes. Suppose the first run finds a wire diff. While the PR is closed, the same wire change lands independently on master. Reopening the PR triggers a new comparison, which finds no diff and clears the warning. Rerunning the original publisher then restores the stale warning and label because the PR head SHA and target branch name still match. Could we skip publication when a newer verified comparison has already reported for the same PR head and target branch?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a check for this in an earlier commit, but later removed it. It made the workflow harder to maintain, and this case is rare.

If an old run posts the wrong result, we can run the publisher again for the newer build. That will fix the label and the comment. I’d prefer to keep the workflow simple.

for (const comment of comments) {
if (comment.user?.login === 'github-actions[bot]' && comment.body?.startsWith(marker))
await issues.deleteComment({...repo, comment_id: comment.id});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the diff is still present and GitHub returns a 503 when creating the replacement comment, this deletion has already removed the only link to the report. Could we post the new warning first, then delete the old warnings from the list fetched above? That way a failed post preserves the previous link, and a later successful run can clean up any duplicates.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@chesnokoff
chesnokoff merged commit bca4b19 into apache:master Nov 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants